<!DOCTYPE html>
<html lang="en">
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <!-- th:value,用来给标签赋值 -->
    <input type="text" th:value="${value}">

    <hr>
    <!-- th:src -->
    <!-- 如果想直接写死，就 th:src="@{/1.png}" -->
    <img width="300" th:src="${src}">

    <hr>
    <!-- th:href,用于设置超链接 -->
    <a th:href="${href}">百度</a>

    <hr>
    <!-- th:select 匹配就选中 -->
    <select>
        <option
                th:each="user:${list}"
                th:value="${user.id}"
                th:text="${user.name}"
                th:selected="${user.name == name}"
        ></option>
    </select>

    <hr>
    <!-- th:attr 给HTML标签任意属性赋值 -->
    <input th:attr="value=${attr}"><br>
    <input th:value="${attr}"><br>  <!-- 一样的效果 -->
</body>
</html>